Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable realtime monitoring
Get the value of SQSRealtimeScannerArn from Identification stack output
Run this on CloudSecTest Account (replace stack name with your prefix):
Enable ReatTime Scanning Cross Account in Prod
Note: CrossAccount Scanning is only Supported in Prod as of now.
Run this on CloudSecProd Account:
Unfortuantely EventBusPolicy seems to be bugged for Cloud Formation so we must do this step manually.
Run this on all regions:
AP: "ap-south-1" "ap-northeast-2" "ap-northeast-1" "ap-southeast-1" "ap-southeast-2"
EU: "eu-west-3" "eu-west-2" "eu-west-1" "eu-central-1"
SA: "sa-east-1"
CA: "ca-central-1"
US: "us-east-1" "us-east-2" "us-west-1" "us-west-2"
Get the value of SQSRealtimeScannerArn from Identification stack output
Run this on CloudSecProduction Account:
Run this on CentralizedDeployment Account:
Deploy the Role to to enable Cross Account Scanning
Deply the CloudWatch Alarm Stack Set
Example:
make sure to specify all the regions you wish to select and accounts you wish to enable realtime monitoring
aws cloudformation update-stack-instances --stack-set-name CloudSecurity-Hammer-Realtime-CloudTrail-Eventbus-US --regions "us-east-1" "us-east-2" "us-west-1" "us-west-2" --operation-preferences FailureToleranceCount=100,MaxConcurrentCount=20 --region us-east-1 --accounts <list of accounts>
NOTE:
Only works for these current rules:
'ec2_public_ami',
'ebs_unencrypted_volume',
'ebs_public_snapshot',
'user_inactivekeys',
'user_keysrotation',
'rds_encryption',
'rds_public_snapshot',
's3_bucket_acl',
's3_bucket_policy',
's3_encryption',
'secgrp_unrestricted_access',
'sqs_public_access'
Other rules can be onboarded as well by changing the CF Template for realtime-hammer-cloudwatch-filter.json